
import { postLoginWxMinSimple } from '@/http/profile'



export default {
    // 命名空间
    namespaced: true,
    state: {
        // 用户信息
        profile: null
    },
    getters: {},
    mutations: {
        setProfile(state, payLoad) {
            state.profile = payLoad
        }
    },
    actions: {
        // 异步执行登录 获取信息
        async fetProfile({ commit }, phoneNumber) {
            const result = await postLoginWxMinSimple(phoneNumber)
            commit('setProfile', result.result)
        }
    }
}